import React, { Component } from 'react'
import { Route, NavLink, Switch, withRouter, Redirect } from 'react-router-dom'
import Cartoon from '../../views/Cartoon/Cartoon'
import Find from '../../views/Find/Find'
import World from '../../views/World/World'
import Center from '../../views/Center/Center'
import List from '../../views/List/Cartoon'
import Detail from '../../views/Detail'
import Searc from '../../views/Search/Search'
import { FooterStyle } from './style'

@withRouter
class Footer extends Component {
    render() {
        return (
            <>
                <FooterStyle>
                    <NavLink to='/cartoon'>
                        <li className="iconfont icon-manhua"></li>
                        <span>追漫</span>
                    </NavLink>
                    <NavLink to='/find'>
                        <li className="iconfont icon-faxian"></li>
                        <span>发现</span>
                    </NavLink>
                    <NavLink to='/world'>
                        <li className="iconfont icon-shijie"></li>
                        <span>世界</span>
                    </NavLink>
                    <NavLink to='/center'>
                        <li className="iconfont icon-wode"></li>
                        <span>我的</span>
                    </NavLink>
                </FooterStyle>

                <Route path='/cartoon' component={Cartoon} />
                <Route path='/find' component={Find} />
                <Route path='/world' component={World} />
                <Route path='/center' component={Center} />
                <Route path={'/List'} component={List} />
                <Route path={'/Detail/:id'} component={Detail} />
                <Route path='/search' component={Searc} />
                <Redirect from='/' to='/find' />
            </>
        )
    }
}
export default Footer